package com.retrofit.demo.entity;

import java.util.List;

/**
 * desc: 有道词典
 * 2018-05-24 13:58
 */
public class YdcdEntity {
    // 翻译类型。2  之前表示原文类型，2 之后表示译文类型。ps: 2 表示 to
    private String type;
    private int errorCode;
    private int elapsedTime;
    private List<List<TranslateResult>> translateResult;

    public List<List<TranslateResult>> getTranslateResult() {
        return translateResult;
    }

    /**
     * 翻译结果
     */
    public static class TranslateResult {
        private String src;  // 原文
        private String tgt; // 译文

        @Override
        public String toString() {
            return "TranslateResult{" +
                    "src='" + src + '\'' +
                    ", tgt='" + tgt + '\'' +
                    '}';
        }


        public String getSrc() {
            return src;
        }

        public String getTgt() {
            return tgt;
        }
    }

    @Override
    public String toString() {
        return "YdcdEntity{" +
                "type='" + type + '\'' +
                ", errorCode=" + errorCode +
                ", elapsedTime=" + elapsedTime +
                ", translateResult=" + translateResult +
                '}';
    }
}
